FORM frm_set_icon USING M_MSG TYPE BAPI_MSG
M_ICON TYPE ICON_D.

IF M_MSG IS INITIAL.
    WRITE ICON_LED_GREEN TO M_ICON.
    M_MSG = '成功'
ELSE.
    WRITE ICON_LED_RED TO M_ICON.
ENDIF.
ENDFORM.